# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年10月12日
"""
import pandas as pd

# multi = pd.MultiIndex.from_arrays([
# 	['a', 'a', 'b', 'b'],
# 	[1, 2, 1, 2]
# ],names=['x', 'y']) 
# multi = pd.MultiIndex.from_tuples([('a',1),('a',2),('b',1),('b',2)],names=['x', 'y'])

multi = pd.MultiIndex.from_product([['a', 'b'], [1, 2]], names=['x', 'y'])

print(multi)
